//
//  LeftTableViewCell.m
//  Cat
//
//  Created by lushitong on 2018/12/13.
//  Copyright © 2018年 lushitong. All rights reserved.
//

#import "LeftTableViewCell.h"

@interface LeftTableViewCell()

@property (nonatomic, strong) UILabel *leftLabel;
//#F3F3F3
@end
@implementation LeftTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {
		self.cellSeparatorStyle = QKUITableViewCellSeparatorStyleSingleLineBottomZero;
		self.selectionStyle = UITableViewCellSelectionStyleNone;
		[self loadTableView];
	}
	return self;
}

- (void)loadTableView {
	[self.contentView addSubview:self.name];
	[self.name mas_makeConstraints:^(MASConstraintMaker *make) {
		make.centerY.equalTo(self.contentView.mas_centerY);
		make.centerX.equalTo(self.contentView.mas_centerX);
	}];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated{
	[super setSelected:selected animated:animated];
	self.contentView.backgroundColor = selected ? [UIColor colorWithWhite:0 alpha:0.1] : [UIColor whiteColor];
	self.highlighted = selected;
	self.name.highlighted = selected;
}

#pragma mark----- lazy init -----

- (UILabel *)name {
	if (!_name) {
		_name = [UILabel labelWithFont:[UIFont systemFontOfSize:kQKFitFont(14)] textColor:COLOR_WITH_HEX(0x57524F)];
	}
	return _name;
}


@end
